import { _decorator, Component, Node, resources, Sprite, SpriteFrame } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Prop')
export class Prop extends Component {

    @property(Sprite)
    sp: Sprite;

    propType: number;

    init(_propType) {
        this.propType = _propType;
        resources.load(`propImg/${_propType}/spriteFrame`, SpriteFrame, (err, res) => {
            this.sp.spriteFrame = res;
        })
    }
}


